package sis.report;

import sis.studentinfo.Student;
import sis.studentinfo.Student.Grade;

public class Entry {

	private Student.Grade grade;
	private String message;
	
	public Entry(Grade grade, String message) {
		this.grade = grade;
		this.message = message;
	}

	@Override
	public int hashCode() {
		final int hashMultiplier = 41;
		int result = 7;
		result = result * hashMultiplier + grade.hashCode();
		result = result * hashMultiplier + message.hashCode();
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj == null) {
			return false;
		}
		if(obj.getClass() != this.getClass()) {
			return false;
		}
		Entry other = (Entry) obj;
		return this.grade == other.grade &&
				this.message.equals(other.message);
	}
	
	

}
